This relates to electronic devices with components that include light sources and, more particularly, to circuitry for controlling components with light sources.
Electronic devices often include components that have light sources. For example, cellular telephones and other devices sometimes have light-based components such as light-based proximity sensors. A light-based proximity sensor may have a light source such as an infrared light-emitting diode and may have a light detector. During operation, the light source emits light. In the presence of nearby objects, some of the emitted light is reflected back towards the proximity sensor and is detected by the light detector. By monitoring the amount of reflected light at the light detector, an electronic device may determine whether an external object is in the vicinity of the electronic device.
It would be desirable to be able to provide fault-tolerant light source control circuitry that helps ensure that emitted light from a light source is not too bright.